export default {
    // url: 'ws://192.168.1.73:16035/agriculture/ws',
    // url: 'ws://127.0.0.1:16033/environment/ws',
    // url: 'ws://47.106.68.76:16033/environment/ws',
    // url: 'ws://8.129.223.218:16033/environment/ws',
    url: process.env.VUE_APP_WEBSOCKET,
    // websocket对象
    ws: {},
    // 重连延迟，单位：毫秒
    delay: 1500,
    // 设置websocket对象方法
    setWs: function(newWs) {
        this.ws = newWs
    },
    // 设置延迟方法
    setDelay: function(newDelay) {
        this.delay = newDelay
    },
    // 发送websocket信息方法
    sendMsg: function(message) {
        this.ws.send(JSON.stringify(message))
    }
}
